package org.dromara.germbank.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 注册审批
 * 数据库表名：bus_approve_register
 */
@Data
@TableName("bus_approve_register")
public class BusApproveRegister implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @TableField("id")
    @NotNull(message = "主键id不能为空")
    @Schema(description = "主键", requiredMode = Schema.RequiredMode.REQUIRED)
    private Integer id;

    @TableField("create_time")
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    @TableField("update_time")
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    @TableField("del_flag")
    @Schema(description = "删除标志（0存在 1删除）")
    private Integer delFlag;

    @TableField("apply_no")
    @NotBlank(message = "申请编号不能为空")
    @Size(max = 50, message = "申请编号长度不能超过50")
    @Length(max = 50, message = "申请编号长度不能超过50")
    @Schema(description = "申请编号", requiredMode = Schema.RequiredMode.REQUIRED)
    private String applyNo;

    @TableField("apply_time")
    @NotNull(message = "申请时间不能为空")
    @Schema(description = "申请时间", requiredMode = Schema.RequiredMode.REQUIRED)
    private LocalDateTime applyTime;

    @TableField("user_type")
    @NotNull(message = "用户类型不能为空")
    @Schema(description = "用户类型", requiredMode = Schema.RequiredMode.REQUIRED)
    private Object userType;

    @TableField("user_name")
    @Size(max = 100, message = "用户姓名长度不能超过100")
    @Length(max = 100, message = "用户姓名长度不能超过100")
    @Schema(description = "用户姓名")
    private String userName;

    @TableField("status")
    @NotNull(message = "状态不能为空")
    @Schema(description = "状态", requiredMode = Schema.RequiredMode.REQUIRED)
    private Object status;

    @TableField("audit_time")
    @Schema(description = "审核时间")
    private LocalDateTime auditTime;

}
